| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | List of all members
nkGraphics::EntityRenderInfo Class Referencefinal

Compiles the render information for an Entity to use within a RenderQueue. More...

Inheritance diagram for nkGraphics::EntityRenderInfo:

## Public Member Functions
| EntityRenderInfo () noexcept
| EntityRenderInfo (const EntityRenderInfo &other) noexcept
| EntityRenderInfo (EntityRenderInfo &&other) noexcept
| EntityRenderInfo (Mesh *mesh, Shader *shader) noexcept
virtual | ~EntityRenderInfo ()
EntityRenderInfoSlot * | getSlot (unsigned int index) const
const nkMemory::BufferCast< EntityRenderInfoSlot * > & | getSlots () const
Entity * | getParentEntity () const
EntityRenderInfoSlot * | addSlot (const EntityRenderInfoSlot &infoSlot=EntityRenderInfoSlot())
void | eraseSlot (unsigned int index)
EntityRenderInfo & | operator= (const EntityRenderInfo &other) noexcept
EntityRenderInfo & | operator= (EntityRenderInfo &&other) noexcept
virtual void | exportClassToTree (nkExport::Node *rootNode) override
virtual void | importClassFromTree (nkExport::Node *rootNode) override
Public Member Functions inherited from nkExport::Exportable
| Exportable () noexcept
virtual | ~Exportable ()

## Detailed Description

Compiles the render information for an Entity to use within a RenderQueue.

This class is the starting point, where all slots and lods will be provided. A high level overview of the hierarchy is as such :

Info

- Slot #0
  - Lod #0
  - Lod #1
  - ...
  - Lod #x
- Slot #1
  - Lod #0
  - Lod #1
  - ...
  - Lod #y
- ...
- Slot #n
  - Lod #0
  - Lod #1
  - ...
  - Lod #z

For the default render strategy, each slot will be questioned for the LOD to render depending on its parameters, for a given pass. It is possible to add as many slots as wanted to the information, and each can have any amount of LOD as required.

## Constructor & Destructor Documentation

## ◆ EntityRenderInfo() [1/4]

nkGraphics::EntityRenderInfo::EntityRenderInfo | ( |  | ) |
| noexcept

Default constructor.

## ◆ EntityRenderInfo() [2/4]

nkGraphics::EntityRenderInfo::EntityRenderInfo | ( | const EntityRenderInfo & | other | ) |
| noexcept

Copy constructor.

Parameters

  other | The render information to copy from.

## ◆ EntityRenderInfo() [3/4]

nkGraphics::EntityRenderInfo::EntityRenderInfo | ( | EntityRenderInfo && | other | ) |
| noexcept

Move constructor.

Parameters

  other | The render information to move.

## ◆ EntityRenderInfo() [4/4]

nkGraphics::EntityRenderInfo::EntityRenderInfo | ( | Mesh * | mesh,
|  | Shader * | shader
| ) |  |
| noexcept

Legacy convenience constructor. This constructor mimicks what was possible before to a certain degree, by quickly creating a slot and a LOD using both parameters provided. This LOD will be used in all cases.

Parameters

  mesh | The mesh to use.
  shader | The shader to use.

## ◆ ~EntityRenderInfo()

virtual nkGraphics::EntityRenderInfo::~EntityRenderInfo | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ getSlot()

EntityRenderInfoSlot* nkGraphics::EntityRenderInfo::getSlot | ( | unsigned int | index | ) | const

Parameters

  index | The index of the slot to retrieve.

Returns
  The slot requested if available, nullptr otherwise.

## ◆ getSlots()

const nkMemory::BufferCast<EntityRenderInfoSlot*>& nkGraphics::EntityRenderInfo::getSlots | ( |  | ) | const

Returns
  A const reference over the slots available.

## ◆ getParentEntity()

Entity* nkGraphics::EntityRenderInfo::getParentEntity | ( |  | ) | const

Returns
  The parent entity, if available, nullptr otherwise.

## ◆ addSlot()

EntityRenderInfoSlot* nkGraphics::EntityRenderInfo::addSlot | ( | const EntityRenderInfoSlot & | infoSlot = `EntityRenderInfoSlot()` | ) |

Adds a slot to the information.

Parameters

  infoSlot | The slot to copy from, if required.

Returns
  The newly created slot, within the information's memory.

## ◆ eraseSlot()

void nkGraphics::EntityRenderInfo::eraseSlot | ( | unsigned int | index | ) |

Erases an existing slot.

Parameters

  index | The index of the slot to erase.

## ◆ operator=() [1/2]

EntityRenderInfo& nkGraphics::EntityRenderInfo::operator= | ( | const EntityRenderInfo & | other | ) |
| noexcept

Copy assignment operator.

Parameters

  other | The information to copy from.

## ◆ operator=() [2/2]

EntityRenderInfo& nkGraphics::EntityRenderInfo::operator= | ( | EntityRenderInfo && | other | ) |
| noexcept

Move assignment operator.

Parameters

  other | The information to move from.

## ◆ exportClassToTree()

virtual void nkGraphics::EntityRenderInfo::exportClassToTree | ( | nkExport::Node * | rootNode | ) |
| override virtual

Exports an item into a tree describing its structure and its data.

Parameters

  rootNode | The node into which the object has to write its related information.

Implements nkExport::Exportable.

## ◆ importClassFromTree()

virtual void nkGraphics::EntityRenderInfo::importClassFromTree | ( | nkExport::Node * | rootNode | ) |
| override virtual

Imports information from a tree which is supposed to describe its structure and data.

Parameters

  rootNode | The root node of the tree holding the information.

Implements nkExport::Exportable.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsGraphics/Entities/EntityRenderInfo.h